#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int factorial(int n)
{
    if (1 == n)
        return 1;
    else
        return n * factorial(n - 1);
}
int main()
{
    int n = 0;
    scanf("%d", &n);
    printf("%d\n", factorial(n));
    return 0;
}






#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int factorial(int n)
{
    int a = 1;
    int i = 0;
    for (i = 1; i <= n; i++)
    {
        a *= i;
    }
    return a;
}
int main()
{
    int n = 0;
    scanf("%d", &n);
    printf("%d\n", factorial(n));
    return 0;
}
